package com.originit.product.server.aspect

import com.originit.product.server.exception.ProductException
import com.originit.product.server.vo.ResultVO
import org.springframework.web.bind.annotation.ExceptionHandler

class ExceptionHandler {

    @ExceptionHandler(ProductException::class)
    fun <T> handleException(exception: ProductException):ResultVO<T>{
        return ResultVO<T>(msg = exception.message,code = exception.code)
    }
}